<?php
/**
 * GoodsGift.php
 *
* 跨境电商商城系统
 * =============================================
 * Copy right 2016-2026 大连熠泽科技网络有限公司
 * ---------------------------------------------
 * 官方网址: http://www.yizehuitong.com
 * =============================================
 * @author : yizehuitong
 * @date : 2019.10
 * @version : v2.0
 */

namespace data\service\promotion;

use data\service\BaseService;
use data\model\NsPromotionGiftGoodsModel;
use data\model\AlbumPictureModel;

/**
 * 商品总赠品管理
 */
class GoodsGift extends BaseService
{
	/**
	 * 查询赠品的商品信息
	 */
	public function getGiftGoodsInfo($gift_id)
	{
		$gift = new NsPromotionGiftGoodsModel();
		$goods_info = $gift->getInfo([ 'gift_id' => $gift_id ], 'goods_id,goods_name,goods_picture');
		$picture = new AlbumPictureModel();
		$picture_info = $picture->getInfo([ 'pic_id' => $goods_info['goods_picture'] ], '*');
		$goods_info['picture_info'] = $picture_info;
		return $goods_info;
	}
}